package com.entity;

import com.annotation.ColumnInfo;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.utils.DateUtil;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;


/**
 * 法制宣传留言
 *
 * @author
 * @email
 */
@TableName("xinlijiankang_liuyan")
public class FazhixuanchuanLiuyanEntity<T> implements Serializable {
    private static final long serialVersionUID = 1L;


    public FazhixuanchuanLiuyanEntity() {

    }

    public FazhixuanchuanLiuyanEntity(T t) {
        try {
            BeanUtils.copyProperties(this, t);
        } catch (IllegalAccessException | InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }


    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    @ColumnInfo(comment = "主键", type = "int(11)")
    @TableField(value = "id")

    private Integer id;


    /**
     * 法制宣传
     */
    @ColumnInfo(comment = "法制宣传", type = "int(11)")
    @TableField(value = "xinlijiankang_id")

    private Integer xinlijiankangId;


    /**
     * 用户
     */
    @ColumnInfo(comment = "用户", type = "int(11)")
    @TableField(value = "yonghu_id")

    private Integer yonghuId;


    /**
     * 留言内容
     */
    @ColumnInfo(comment = "留言内容", type = "text")
    @TableField(value = "xinlijiankang_liuyan_text")
    private String xinlijiankangLiuyanText;

    /**
     * 留言时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    @ColumnInfo(comment = "留言时间", type = "timestamp")
    @TableField(value = "insert_time", fill = FieldFill.INSERT)

    private Date insertTime;


    /**
     * 回复内容
     */
    @ColumnInfo(comment = "回复内容", type = "text")
    @TableField(value = "reply_text")

    private String replyText;


    /**
     * 回复时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    @ColumnInfo(comment = "回复时间", type = "timestamp")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)

    private Date updateTime;


    /**
     * 创建时间  listShow
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    @ColumnInfo(comment = "创建时间", type = "timestamp")
    @TableField(value = "create_time", fill = FieldFill.INSERT)

    private Date createTime;


    /**
     * 获取：主键
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置：主键
     */

    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取：法制宣传
     */
    public Integer getXinlijiankangId() {
        return xinlijiankangId;
    }

    /**
     * 设置：法制宣传
     */

    public void setXinlijiankangId(Integer xinlijiankangId) {
        this.xinlijiankangId = xinlijiankangId;
    }

    /**
     * 获取：用户
     */
    public Integer getYonghuId() {
        return yonghuId;
    }

    /**
     * 设置：用户
     */

    public void setYonghuId(Integer yonghuId) {
        this.yonghuId = yonghuId;
    }

    /**
     * 获取：留言内容
     */
    public String getXinlijiankangLiuyanText() {
        return xinlijiankangLiuyanText;
    }

    /**
     * 设置：留言内容
     */

    public void setXinlijiankangLiuyanText(String xinlijiankangLiuyanText) {
        this.xinlijiankangLiuyanText = xinlijiankangLiuyanText;
    }

    /**
     * 获取：留言时间
     */
    public Date getInsertTime() {
        return insertTime;
    }

    /**
     * 设置：留言时间
     */

    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }

    /**
     * 获取：回复内容
     */
    public String getReplyText() {
        return replyText;
    }

    /**
     * 设置：回复内容
     */

    public void setReplyText(String replyText) {
        this.replyText = replyText;
    }

    /**
     * 获取：回复时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置：回复时间
     */

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取：创建时间  listShow
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置：创建时间  listShow
     */

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "XinlijiankangLiuyan{" +
                ", id=" + id +
                ", xinlijiankangId=" + xinlijiankangId +
                ", yonghuId=" + yonghuId +
                ", xinlijiankangLiuyanText=" + xinlijiankangLiuyanText +
                ", insertTime=" + DateUtil.convertString(insertTime, "yyyy-MM-dd") +
                ", replyText=" + replyText +
                ", updateTime=" + DateUtil.convertString(updateTime, "yyyy-MM-dd") +
                ", createTime=" + DateUtil.convertString(createTime, "yyyy-MM-dd") +
                "}";
    }
}
